package ar.com.mindset.geometrics_wi.colorScheme;

/**
 * @author http://www.mindset-designs.com
 */
public class SolidColorScheme extends ColorScheme {

    private String color;
    private float alpha = -1;


    public void setColor(String color) {
        this.color = color;
    }

    public void setAlpha(float alpha) {
        this.alpha = alpha;
    }

    @Override
    protected void writeColorScheme(StringBuffer xml) {
        xml.append("<solid");
        if (this.color != null) {
            xml.append(" color='").append(this.color).append("'");
        }
        if (this.alpha != -1) {
            xml.append(" alpha='").append(this.alpha).append("'");
        }
        xml.append("/>");
    }
}
